#include "ext_axis.h"

using axisgroup::ExtAxis;

ExtAxis::ExtAxis() { memset(axis, 0, sizeof(axis)); }
ExtAxis::ExtAxis(double j[kRobExtAxisMaxNum]) { memcpy(axis, j, sizeof(axis)); }
ExtAxis ExtAxis::operator+(ExtAxis j)
{
    ExtAxis ret;
    for (int i = 0; i < kRobExtAxisMaxNum; i++) { ret.axis[i] = axis[i] + j.axis[i]; }
    return ret;
}
ExtAxis ExtAxis::operator-(ExtAxis j)
{
    ExtAxis ret;
    for (int i = 0; i < kRobExtAxisMaxNum; i++) { ret.axis[i] = axis[i] - j.axis[i]; }
    return ret;
}
